package phapp.model.custom;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;

/**
 * Title: t_feedback_data 数据类 POJO Description: DAO层映射到数据类,页面封装数据映射到数据类
 * Copyright: Copyright (c) 2012-10 Company:
 * 
 * @author you name
 * @version 1.0
 */

public class Feedback extends BaseEntity
{

   // date formats
   public static final String FORMAT_CREATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_UPDATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_REPLY_DATE = DATE_TIME_FORMAT;

   // columns START
   /** dataId */
   private java.lang.Integer dataId;
   /** custId */
   private java.lang.Integer custId;
   /** custFeedback */
   private java.lang.String custFeedback;
   /** systemReply */
   private java.lang.String systemReply;
   /** replyUserid */
   private java.lang.Integer replyUserid;
   /** createDate */
   private java.sql.Timestamp createDate;
   /** updateDate */
   private java.sql.Timestamp updateDate;
   /** replyDate */
   private java.sql.Timestamp replyDate;
   
   private java.lang.String custName;

   private java.util.ArrayList idList;

   // columns END

   public Feedback()
   {
   }

   public java.lang.String getCustName()
   {
      return custName;
   }

   public void setCustName(java.lang.String custName)
   {
      this.custName = custName;
   }

   public Feedback(java.lang.Integer dataId)
   {
      this.dataId = dataId;
   }

   public void setId(java.lang.Integer value)
   {
      this.dataId = value;
   }

   public java.lang.Integer getId()
   {
      return this.dataId;
   }
   
   public void setDataId(java.lang.Integer value)
   {
      this.dataId = value;
   }

   public java.lang.Integer getDataId()
   {
      return this.dataId;
   }

   public void setCustId(java.lang.Integer value)
   {
      this.custId = value;
   }

   public java.lang.Integer getCustId()
   {
      return this.custId;
   }

   public void setCustFeedback(java.lang.String value)
   {
      this.custFeedback = value;
   }

   public java.lang.String getCustFeedback()
   {
      return this.custFeedback;
   }

   public void setSystemReply(java.lang.String value)
   {
      this.systemReply = value;
   }

   public java.lang.String getSystemReply()
   {
      return this.systemReply;
   }

   public void setReplyUserid(java.lang.Integer value)
   {
      this.replyUserid = value;
   }

   public java.lang.Integer getReplyUserid()
   {
      return this.replyUserid;
   }

   public String getCreateDateString()
   {
      return date2String(getCreateDate(), FORMAT_CREATE_DATE);
   }

   public void setCreateDateString(String value)
   {
      setCreateDate(string2Date(value, FORMAT_CREATE_DATE, java.sql.Timestamp.class));
   }

   public void setCreateDate(java.sql.Timestamp value)
   {
      this.createDate = value;
   }

   public java.sql.Timestamp getCreateDate()
   {
      return this.createDate;
   }

   public String getUpdateDateString()
   {
      return date2String(getUpdateDate(), FORMAT_UPDATE_DATE);
   }

   public void setUpdateDateString(String value)
   {
      setUpdateDate(string2Date(value, FORMAT_UPDATE_DATE, java.sql.Timestamp.class));
   }

   public void setUpdateDate(java.sql.Timestamp value)
   {
      this.updateDate = value;
   }

   public java.sql.Timestamp getUpdateDate()
   {
      return this.updateDate;
   }

   public String getReplyDateString()
   {
      return date2String(getReplyDate(), FORMAT_REPLY_DATE);
   }

   public void setReplyDateString(String value)
   {
      setReplyDate(string2Date(value, FORMAT_REPLY_DATE, java.sql.Timestamp.class));
   }

   public void setReplyDate(java.sql.Timestamp value)
   {
      this.replyDate = value;
   }

   public java.sql.Timestamp getReplyDate()
   {
      return this.replyDate;
   }

   public java.util.ArrayList getIdList()
   {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList)
   {
      this.idList = idList;
   }

   /** 手动增加属性后,toString,hashCode,equals都要修改 */
   public String toString()
   {
      return new ToStringBuilder(this).append("DataId", getDataId()).append("CustId", getCustId()).append("CustFeedback", getCustFeedback()).append("SystemReply", getSystemReply()).append("ReplyUserid", getReplyUserid())
               .append("CreateDate", getCreateDate()).append("UpdateDate", getUpdateDate()).append("ReplyDate", getReplyDate()).toString();
   }

   public int hashCode()
   {
      return new HashCodeBuilder().append(getDataId()).append(getCustId()).append(getCustFeedback()).append(getSystemReply()).append(getReplyUserid()).append(getCreateDate()).append(getUpdateDate()).append(getReplyDate()).toHashCode();
   }

   public boolean equals(Object obj)
   {
      if (obj instanceof Feedback == false) return false;
      if (this == obj) return true;
      Feedback other = (Feedback) obj;
      return new EqualsBuilder().append(getDataId(), other.getDataId()).append(getCustId(), other.getCustId()).append(getCustFeedback(), other.getCustFeedback()).append(getSystemReply(), other.getSystemReply())
               .append(getReplyUserid(), other.getReplyUserid()).append(getCreateDate(), other.getCreateDate()).append(getUpdateDate(), other.getUpdateDate()).append(getReplyDate(), other.getReplyDate()).isEquals();
   }
}
